<template>
  <div class="nav">
    <div class="nav-item" v-bind:class="{on: isActive == 0}">
      <router-link to="/product">
        <i class="iconfont icon-category"></i> 备货列表
      </router-link>
    </div>
    <div class="nav-item" v-bind:class="{on: isActive == 1}">
      <router-link to="/account">
        <i class="iconfont icon-account"></i> 个人中心
      </router-link>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  export default {
    props: ['isActive'],
    data () {
      return {
        current: '0'
      }
    }
  }
</script>

<style lang="stylus" rel="stylesheet/stylus">
  .nav{
    height: 43px;
    right: 0;
    bottom: 0;
    left: 0;
    position: fixed;
    z-index: 1;
    display: flex;
    border-top: 1px solid rgba(136, 141, 141, .2);
    background-color: white;
    font-size: 16px;
  }
  .nav .nav-item{
    flex: 1;
  }
  .nav .nav-item > a{
    padding: 10px 0;
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
    text-decoration: none;
    color: #494d50;
  }
  .nav .nav-item.on > a{
    color: #2ca338;
  }
</style>
